Skip to content

Upgrade ThinkFlow flashcards with generation controls, citations, and animated study UX & integrate editable PresentAgent PPT workflowDingcheng dev#27

Open
Huangdingcheng wants to merge 2 commits intothinkflowfrom
dingcheng-dev
Open

Upgrade ThinkFlow flashcards with generation controls, citations, and animated study UX & integrate editable PresentAgent PPT workflowDingcheng dev#27
Huangdingcheng wants to merge 2 commits intothinkflowfrom
dingcheng-dev

Conversation

@Huangdingcheng
Copy link
Copy Markdown
Collaborator

Summary

This PR combines two related ThinkFlow upgrades:

  1. A flashcard workflow refresh with generation controls, citations, and a smoother animated study experience.
  2. A first usable editable PPT path backed by vendored PresentAgent, plus optional ONLYOFFICE online editing for
    generated PPTX files.

It also hardens the ONLYOFFICE integration so local development works through the frontend proxy without leaking
internal API keys into document URLs.

Flashcards

  • Adds generation controls to the flashcard output flow.
  • Improves the study UX with citation-aware content and animated transitions.
  • Updates the flashcard study surfaces so users can generate, review, and study more naturally inside the
    workspace.
  • Keeps the English and Chinese frontends aligned for the updated flashcard experience.

Editable PresentAgent PPT

  • Vendors the PresentAgent runtime under vendor/presentagent.
  • Adds EditablePPTService as a dedicated backend wrapper for the editable PPT pipeline.
  • Introduces editable_ppt as a first-class output type in outputs-v2.
  • Persists generated PPTX, deck IR, slide IR, and run metadata under the notebook output directory.
  • Adds a separate editable PPT workspace in the Chinese frontend.
  • Keeps PPTX download fallback available when ONLYOFFICE is not configured.

ONLYOFFICE Integration

  • Adds backend endpoints for:
    • editable PPTX editor config
    • PPTX download
    • save callback
    • editable IR updates
  • Adds a real same-origin online-editor-frame.html to host the editor logic.
  • Proxies Document Server assets through Vite /onlyoffice in local development.
  • Configures ONLYOFFICE cache URLs so they stay on the frontend origin instead of jumping to localhost:8082.
  • Uses per-open editor_session_id and document-key versioning to avoid stale editor sessions.
  • Normalizes generated PPTX with LibreOffice before online editing to avoid ONLYOFFICE parser failures.

Safety / Secret Handling

  • Removes real default API keys from vendored PresentAgent config defaults.
  • Stops putting internal API keys into ONLYOFFICE document/callback URLs.
  • Validates ONLYOFFICE download/callback requests by document key and session context instead of exposing the
    internal workflow key in the URL.

Deployment Notes

  • ONLYOFFICE remains optional.
  • Local development expects:
    • ONLYOFFICE_DOCUMENT_SERVER_URL=/onlyoffice
    • ONLYOFFICE_THINKFLOW_PUBLIC_URL=...
    • ONLYOFFICE_DOCUMENT_DOWNLOAD_BASE_URL=...
    • storage.externalHost=http://localhost:3003/onlyoffice inside the Document Server container
  • Production should place ONLYOFFICE behind a trusted HTTP(S) origin and enable JWT if required.

Validation

  • python -m pytest -q tests/test_editable_ppt_service.py tests/test_output_v2_editable_ppt.py
  • python -m pytest -q tests/test_online_editor_frame_static.py
  • cd frontend_zh && npm run build

Notes

This branch intentionally keeps the new editable PPT workflow and the flashcard UI refresh together because both
land in the ThinkFlow workspace and share the same release surface.

- add flashcard generation controls for difficulty, count, topic, and test focus
- persist generation config and show it when reopening flashcard outputs
- add structured card citations with inline citation preview and source switching
- map outputs-v2 flashcard citations back to real source files instead of generation_input.md
- support flashcard and quiz outputs importing back as knowledge sources
- improve Chinese and English flashcard study UI with animated flip cards
- fix flashcard back-face leakage, source preview behavior, and dark-card readability
- document the final flashcard design and implementation plan
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant